#!/usr/bin/env bash  
#restart to tomcat
PATH=${PATH}
export PATH
tomcat_HOME=/home/donald/tomcat
pStatus=` ps -ef | grep catalina | grep catalina | awk '{print $2}'`
##########################
##########################
echo
echo -n  shutdown tomcat ...
if [ $pStatus > 0 ];then
       kill -9 $pStatus
       sleep 10
       echo tomcat is shutdonwed...
       echo  "start tomcat ..."
      #${TOMCAT_HOME}/bin/startup.sh  >>  ${TOMCAT_HOME}/logs/restart.out 2>&1 
       ${TOMCAT_HOME}/bin/startup.sh
       sleep 3
       echo tomcat is running...
else 
      echo -e can not find the tomcat process...?
fi

